<div class="main-title">
  <div class="element">
    <h5>Reports
      <a href="#" data-dropdown="drop1" class="report-select">Grouped Employee report for a time range  ▾</a>
      <ul id="drop1" class="f-dropdown report-select" data-dropdown-content>
        <%= render 'reports/report_types' %>
      </ul>
    </h5>
  </div>
</div>
<div class="report-options">
  <!--<form class="employee_daily_report_form" data-remote="false">-->
  <%= form_for(:report, :url => {:controller => 'reports', :action => 'employees_time_range'}, :method => :get, :remote => true, :class => 'employee_daily_report_form') do %>
      <div class="report-type">
            <%= select_tag 'report[type]', options_for_select(@opts, @report_type), :class => 'report_type_select' %>
      </div>
      <div class="report_options">

      </div>
      <div class="submit_button  show-for-medium-up">
        <button>Go</button>
      </div>
      <div class="report-date">
        <%= text_field_tag 'report[start_date]', @start_date, :class => 'date-only-input' %>
        <%= text_field_tag 'report[end_date]', @end_date, :class => 'date-only-input' %>
      </div>
      <div class="submit_button show-for-small-only">
        <button>Go</button>
      </div>
  <% end %>
  <!--</form>-->
</div>
<div class="report-renderer">
  <%= render :partial => 'reports/employee_time_range' %>
</div>
<script type="text/javascript">
    $('.report_type_select').on("change", function () {
        $.get('/reports/get_selection_list?type=' + $(this).val())
    });
</script>